<template>
    <view class="container data-v-1716e242">
        <scroll-view class="left data-v-1716e242">
            <view
                @tap="__e"
                :class="['item', 'data-v-1716e242', currentCategoryId == item.id ? 'actived' : '']"
                :data-event-opts="[['tap', [['e0', ['$event']]]]]"
                v-for="(item, index) in categoryList"
                :key="index"
            >
                {{ '' + item.title + '' }}
            </view>
        </scroll-view>
        <view class="right data-v-1716e242">
            <view
                @tap="__e"
                class="item data-v-1716e242"
                :data-event-opts="[['tap', [['toList', ['$0'], [[['rightList', '', index]]]]]]]"
                hoverClass="hover"
                v-for="(item, index) in rightList"
                :key="index"
            >
                <image class="thumb data-v-1716e242" mode="aspectFill" :src="item.thumb"></image>

                <view class="title data-v-1716e242">{{ item.title }}</view>
            </view>
            <no-data @__l="__l" class="data-v-1716e242" vueId="819668e8-1" v-if="!$root.g0"></no-data>
        </view>
    </view>
</template>

<script>
import noData from '@/components/NoData/NoData';
import tabBar from '@/components/TabBar/tabBar';
(global.webpackJsonp = global.webpackJsonp || []).push([
    ['pages/category/index'],
    {
        '3fe3': function (t, e, n) {
            'use strict';

            var a = n('afb0');
            n.n(a).a;
        },
        7472: function (t, e, n) {},
        '820f': function (t, e, n) {
            'use strict';

            (function (t, e) {
                var a = n('4ea4');
                n('18ba');
                a(n('66fd'));
                var r = a(n('eabf'));
                t.__webpack_require_UNI_MP_PLUGIN__ = n;
                e(r.default);
            }.call(this, n('bc2e').default, n('543d').createPage));
        },
        '98d6': function (t, e, n) {
            'use strict';

            var a = n('7472');
            n.n(a).a;
        },
        afb0: function (t, e, n) {},
        cb2a: function (t, e, n) {
            'use strict';

            (function (t) {
                var a = n('4ea4');
                Object.defineProperty(e, '__esModule', {
                    value: true
                });
                e.default = void 0;
                var r = a(n('2eee'));
                var i = a(n('7037'));
                var c = a(n('c973'));
                var o = {
                    components: {},
                    data: function () {
                        return {
                            ipList: [],
                            categoryList: [],
                            currentCategoryId: 'ip',
                            isShowIPList: false
                        };
                    },
                    computed: {
                        rightList: function () {
                            var that = this;
                            if ('ip' == this.currentCategoryId) {
                                return this.ipList;
                            }
                            var e = this.categoryList.find(function (e) {
                                return e.id == that.currentCategoryId;
                            });
                            return e ? e.sub_categories : [];
                        }
                    },
                    onLoad: function (t) {
                        var that = this;
                        return (0, c.default)(
                            r.default.mark(function n() {
                                return r.default.wrap(function (n) {
                                    for (;;) {
                                        switch ((n.prev = n.next)) {
                                            case 0:
                                                that.currentCategoryId = t.category_id;
                                                that.$http('/ip/categories').then(function (t) {
                                                    that.ipList = t.data.list;
                                                });
                                                that.$http('/normal/categories').then(function (t) {
                                                    that.categoryList = t.data.list;
                                                    if ((0, i.default)(that.currentCategoryId) != Number && t.data.list.length > 0) {
                                                        that.currentCategoryId = t.data.list[0].id;
                                                    }
                                                });
                                                that.$visitor.record('category');
                                            case 4:
                                            case 'end':
                                                return n.stop();
                                        }
                                    }
                                }, n);
                            })
                        )();
                    },
                    methods: {
                        toList: function (e) {
                            t.navigateTo({
                                url: '/pages/search/index?type=all&category_id='.concat(e.id, '&title=').concat(e.title)
                            });
                        }
                    }
                };
                e.default = o;
            }.call(this, n('543d').default));
        },
        eabf: function (t, e, n) {
            'use strict';

            n.r(e);
            var a = n('f611');
            var r = n('fd36');
            for (var i in r) {
                if (['default'].indexOf(i) < 0) {
                    (function (t) {
                        n.d(e, t, function () {
                            return r[t];
                        });
                    })(i);
                }
            }
            n('98d6');
            n('3fe3');
            var c = n('f0c5');
            var o = Object(c.a)(r.default, a.b, a.c, false, null, '1716e242', null, false, a.a, void 0);
            e.default = o.exports;
        },
        f611: function (t, e, n) {
            'use strict';

            n.d(e, 'b', function () {
                return r;
            });
            n.d(e, 'c', function () {
                return i;
            });
            n.d(e, 'a', function () {
                return a;
            });
            var a = {
                NoData: function () {
                    return n.e('components/NoData/NoData').then(n.bind(null, 'cafe'));
                }
            };
            var r = function () {
                var that = this;
                var e = (that.$createElement, that._self._c, that.rightList.length);
                that._isMounted ||
                    (that.e0 = function (e, n) {
                        var a = arguments[arguments.length - 1].currentTarget.dataset;
                        var r = a.eventParams || a['event-params'];
                        n = r.item;
                        that.currentCategoryId = n.id;
                    });
                that.$mp.data = Object.assign(
                    {},
                    {
                        $root: {
                            g0: e
                        }
                    }
                );
            };
            var i = [];
        },
        fd36: function (t, e, n) {
            'use strict';

            n.r(e);
            var a = n('cb2a');
            var r = n.n(a);
            for (var i in a) {
                if (['default'].indexOf(i) < 0) {
                    (function (t) {
                        n.d(e, t, function () {
                            return a[t];
                        });
                    })(i);
                }
            }
            e.default = r.a;
        }
    },
    [['820f', 'common/runtime', 'common/vendor']]
]);
</script>
<style>
@import './index.css';
</style>
